package com.fang.dubbo.mock.rpc.register;


import com.fang.dubbo.mock.common.URL;

import java.util.List;
import java.util.Random;

/**
 * @author fanglingxiao
 * @createDateTime 2022/1/2 4:26 下午
 */
public class LoadBalance {

    public static URL random(List<URL> urlList) {
        Random random = new Random();
        int n = random.nextInt(urlList.size());
        return urlList.get(n);
    }
}
